package cn.signalpha.modules.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 商品sku实体类
 *
 * @author suguangjun
 */
@Data
@TableName("shop_goods_sku")
@ApiModel(value = "GoodsSku对象", description = "商品sku")
public class GoodsSku implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
	@JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "商品id")
    private Long goodsId;

    @ApiModelProperty(value = "规格")
    private String spec;

    @ApiModelProperty(value = "图片")
    private String img;

	@ApiModelProperty(value = "成本价")
	private Double costPrice;

    @ApiModelProperty(value = "商品价")
    private Double goodsPrice;

    @ApiModelProperty(value = "市场价")
    private Double marketPrice;

    @ApiModelProperty(value = "库存")
    private Integer stock;

    @ApiModelProperty(value = "重量")
    private Double weight;

    @ApiModelProperty(value = "体积")
    private Double volume;

	@Version
    @ApiModelProperty(value = "版本号")
    private Integer version;

}
